/**
 * Created with IntelliJ IDEA.
 * User: wenxiwen
 * Date: 2022/3/12
 * Time: 18:22
 * Description: No Description
 */
import java.util.Scanner;
import java.util.Random;
public class TestDemo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入姓名");
        String name = scan.nextLine();
        System.out.println("姓名:"+name);
        System.out.println("请输入年龄");
        int a = scan.nextInt();
        System.out.println("年龄:"+a);
        System.out.println("请输入工资");
        double acer = scan.nextDouble();
        System.out.println("工资:"+acer);

    }
    public static void main6(String[] args) {
        Scanner scan = new Scanner(System.in);
        Random rand = new Random();
        int  init = rand.nextInt(100)+1;
        while(true) {
            System.out.println("请输入一个数字");
            int num = scan.nextInt();
            if(num > init) {
                System.out.println("猜大了");
            } else if(num < init) {
                System.out.println("猜小了");
            } else {
                System.out.println("猜对了");
                break;
            }
        }
    }
    public static void main5(String[] args) {
        int ret=1;
        int sum=0;
        for(int i=1;i<=5;i++) {
            ret*=i;
            sum+=ret;
        }
        System.out.println(sum);
    }
    public static void main4(String[] args) {
        int sum=0;
        int sub=0;
        for(int i=1;i<=100;i+=2) {
            sum+=i;
        }
        for(int i=0;i<=100;i+=2) {
            sub+=i;
        }
        System.out.println(sub);
        System.out.println(sum);
    }
    public static void main3(String[] args) {
        int i=1;
        int sum=0;
        while(i<=5) {
            int ret=1;
            int j=1;
            while(j<=i) {
                ret*=j;
                j++;
            }
            sum+=ret;
            i++;
        }
        System.out.println(sum);
    }
    public static void main2(String[] args) {
        int i= 1;
        int ret = 1;
        while(i <= 5) {
            ret*=i;
            i++;
        }
        System.out.println(ret);
    }
    public static void main1(String[] args) {
        int i=1;
        while(i<=10) {
            System.out.println(i);
            i++;
        }
    }
}